<?php
namespace App\Http\Middleware;

use Closure;
use App\Libs\Commons\MyMessage;
use App\Libs\Commons\MyAuth;
use App\Libs\Commons\MyLogger;

class AdminMiddleware
{

	/**
	 * Handle an incoming request.
	 * 
	 * @author zhe.wang
	 * @param \Illuminate\Http\Request $request        	
	 * @param \Closure $next        	
	 * @return mixed
	 */
	public function handle($request, Closure $next)
	{
		$method = $request->method();
		MyLogger::debug('AdminMiddleware', ['method' => $method, 'all' => $request->all()]);
		$env = config('app.env');
		if ($env == 'local') { // debug
			return $next($request);
		}else{
			//todo
		}
		return $next($request);
	}
}
